//
//  DateUtils.h
//  e-nurse
//
//  Created by  on 12/18/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#define DATE_FORMAT "yyyy-MM-dd HH:mm"
#define DATE_DETAIL_FORMAT "yyyy-MM-ddTHH:mm:ssTZD"
#define DATE_FORMAT_YYYY_MM_DD "yyyy-MM-dd"

@interface DateUtils : NSObject

+(NSDateFormatter*)getDateFormatter:(NSString*)format;
+(NSDateFormatter*)getDefaultDateFormatter;
+(NSDateFormatter*)getDetailDateFormatter;
+(NSString*)formatDate:(NSDate*)date;
+(NSDate*)dateFromString:(NSString*)dateStr;


+(void)getStartEndDay:(NSDate**)startDay endDay:(NSDate**)endDay startDate:(NSDate*)startDate endDate:(NSDate*)endDate;
+(NSDate*)getDateByOffset:(NSUInteger)dayOffset currentDate:(NSDate*)currentDate;
+(void)getWeeksRange:(NSDate**)startDay endDay:(NSDate**)endDay currentDay:(NSDate*)currentDate weekCount:(NSInteger)count;
+(void)getMonthsRange:(NSDate**)startDay endDay:(NSDate**)endDay currentDay:(NSDate*)currentDate monthCount:(NSInteger)count;
+(void)getCurrentSeasonRange:(NSDate**)startDay endDay:(NSDate**)endDay currentDay:(NSDate*)currentDate;

+(BOOL)isDayOfDate:(NSDate*)date;
+(BOOL)isNightOfDate:(NSDate*)date;

@end
